home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 8
/
QRZ Ham Radio Callsign Database - Volume 8.iso
/
mac
/
files
/
t_sys5
/
92052tar.gz
/
920528.tar
/
mail_subr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-04
|
934b
|
49 lines
/* @(#) $Header: mail_subr.c,v 1.5 91/06/04 11:34:27 deyke Exp $ */
#include <stdlib.h>
#include <string.h>
#include "timer.h"
#include "mail.h"
/*---------------------------------------------------------------------------*/
char *get_user_from_path(path)
char *path;
{
char *cp;
return (cp = strrchr(path, '!')) ? cp + 1 : path;
}
/*---------------------------------------------------------------------------*/
char *get_host_from_path(path)
char *path;
{
char *cp;
static char tmp[1024];
strcpy(tmp, path);
if (!(cp = strrchr(tmp, '!'))) return "";
*cp = '\0';
return (cp = strrchr(tmp, '!')) ? cp + 1 : tmp;
}
/*---------------------------------------------------------------------------*/
void mailer_failed(sp)
struct mailsys *sp;
{
struct mailjob *jp;
while (jp = sp->jobs) {
sp->jobs = jp->next;
free(jp);
}
sp->state = MS_FAILURE;
sp->nexttime = secclock() + RETRYTIME;
}